//
//  MyZhanVideoViewController.m
//  didipai
//
//  Created by wangjia_01 on 16/3/7.
//  Copyright © 2016年 wangjia_01. All rights reserved.
//

#import "MyZhanVideoViewController.h"
#import "ZhanVideoCollectionViewCell.h"

@interface MyZhanVideoViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (weak, nonatomic) IBOutlet UIButton *backButton;
@property (weak, nonatomic) IBOutlet UICollectionView *vcollection;

@end

@implementation MyZhanVideoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.vcollection.delegate = self;
    self.vcollection.dataSource = self;
    [self.vcollection registerNib:[UINib nibWithNibName:@"ZhanVideoCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"ZhanVideoCollectionViewCell"];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)back:(UIButton *)sender {
}

#pragma mark 表的代理和数据源

-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return 2;
}

-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
  return CGSizeMake((__MainScreen_Width-20)/2,(__MainScreen_Width-120)/2 );
}
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
{
    
    return UIEdgeInsetsMake(5, 5, 5, 5);
    
}
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    ZhanVideoCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ZhanVideoCollectionViewCell" forIndexPath:indexPath];
    return cell;
}

@end
